package com.libc.yygh.model.acl;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.libc.yygh.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * *
 * Created with Description:  权限
 *
 * @fileRelativePath: Permission.java
 * @Date: Created on 2022/4/7  15:25  <br>
 * @author: LiBencheng <br>
 * @version: 1.0 <br>
 */
@Data
@ApiModel (description = "权限")
@TableName ("acl_permission")
public class Permission extends BaseEntity
{

    private static final long serialVersionUID = 1L;

    @ApiModelProperty (value = "所属上级")
    @TableField ("pid")
    private Long pid;

    @ApiModelProperty (value = "名称")
    @TableField ("name")
    private String name;

    @ApiModelProperty (value = "类型(1:菜单,2:按钮)")
    @TableField ("type")
    private Integer type;

    @ApiModelProperty (value = "权限值")
    @TableField ("permission_value")
    private String permissionValue;

    @ApiModelProperty (value = "路径")
    @TableField ("path")
    private String path;

    @ApiModelProperty (value = "component")
    @TableField ("component")
    private String component;

    @ApiModelProperty (value = "图标")
    @TableField ("icon")
    private String icon;

    @ApiModelProperty (value = "状态(0:禁止,1:正常)")
    @TableField ("status")
    private Integer status;

    @ApiModelProperty (value = "层级")
    @TableField (exist = false)
    private Integer level;

    @ApiModelProperty (value = "下级")
    @TableField (exist = false)
    private List< Permission > children;

    @ApiModelProperty (value = "是否选中")
    @TableField (exist = false)
    private boolean isSelect;

}

